﻿<%@ Page Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true" Inherits="MediaMonitor.Admin.PeopleLink"
    Theme="default" Title="People Link - News & Comment" CodeBehind="PeopleLink.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="Server">
    <br />
    <br />
    <br />
    <script type="text/javascript">
        function ShowHideDiv(div, show) {
            if (show) {
                div.style.display = 'block';
                document.getElementById('dvUpload').style.display = 'none';
            }
            else {
                div.style.display = 'none';
                document.getElementById('dvUpload').style.display = 'block';
            }

        }
    </script>
    <%--<asp:UpdatePanel ID="pnlUpdate" runat="server">
        <ContentTemplate>--%>
         <telerik:RadGrid ID="radGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
        AllowSorting="True" GridLines="None" Skin="Hay" OnNeedDataSource="radGrid_NeedDataSource" PageSize="5"
        Width="50%" AutoGenerateColumns="false" GroupingSettings-CaseSensitive="false" OnItemCommand="radGrid_ItemCommand">
        <MasterTableView DataKeyNames="ID" ExpandCollapseColumn-Display="true" GroupLoadMode="Client">
            <Columns>
           <telerik:GridTemplateColumn AllowFiltering="false" ShowFilterIcon="false" HeaderText="Name">
           <ItemTemplate >
           <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
           </ItemTemplate>
           </telerik:GridTemplateColumn>
              
                <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Status">
                    <ItemTemplate>
                      <asp:Label ID="lblHora" runat="server" Text='<%# Eval("Status").ToString() == "True" ? "Linked": "Empty" %>'></asp:Label>
                        <asp:LinkButton ID="LnkRadio" runat="server" ForeColor="#00B050" CommandName="Change" CommandArgument='<%# Eval("ID") %>'>/Change</asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
         <ClientSettings>
                <Scrolling AllowScroll="false" />
                <ClientEvents OnFilterMenuShowing="filterMenuShowing" />
            </ClientSettings>
            <FilterMenu OnClientShowing="MenuShowing" />
    </telerik:RadGrid>
    <br />
    <asp:Panel ID="pnlUpload" runat="server" Visible="false">
        <div style="text-align: left">
            <asp:HiddenField ID="hdnID" runat="server" />
             <asp:HiddenField ID="hdnName" runat="server" />
                <div id="dvUpload" class="Box" style="width: 400px; padding-bottom: 15px;" align="left">
                    <h2>
                        Link PDF with name:
                    </h2>
                    File 1:
                    <asp:FileUpload ID="flRF1" runat="server" /><br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <div style="border: solid 2px #787878; padding: 5px; padding-bottom: 8px; padding-left: 4px;
                        padding-right: 3px; background-color: #dedede; text-align: center;">
                        <asp:ImageButton ID="btnUpload" runat="server" SkinID="Upload" OnClientClick="javascript:ShowHideDiv(document.getElementById('dvUploading'), true)"
                            OnClick="UploadButton_Click" />
                    </div>
                </div>
            
        </div>
        <center>
            <div id="dvUploading" class="GrayBox" style="display: none; text-align: center; width: 300px;"
                align="center">
                <h3>
                    Uploading Data...</h3>
                <img src="../App_Themes/default/ajax/loadingAnimation.gif" />
                <br />
                <br />
            </div>
        </center>
    </asp:Panel>
   
    <asp:Panel ID="pnlInfo1" runat="server" Visible="false">
        <center>
            <div class="Box" style="width: 400px; text-align: left;">
                File 1: <u>Status</u>
                <asp:Label ID="lblInfo1" runat="server" Font-Bold="true">
            
                </asp:Label>
                <br />
                <br />
            </div>
        </center>
    </asp:Panel>
    <br />
    <%-- </ContentTemplate>
     </asp:UpdatePanel>--%>
    <asp:GridView ID="gv" runat="server" AutoGenerateColumn="true">
    </asp:GridView>
</asp:Content>
